Skip to content

Rollup of 12 pull requests #144110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 30 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 18, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 30 commits July 9, 2025 17:07
And include `.github/workflows` for `T-infra` trigger files.
Reverting file name weird-exprs.rs due to its historical use, recognition in community and references
Also make it *only* usable on nightly
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Add a test showing `#![feature(default_field_values)]` using `#[const_trait] trait Default` (`#![feature(const_default)]` + `#![feature(const_trait_impl)]`).
Remove duplicate error about raw underscore lifetime

Fixes rust-lang#143152

r? ``@fee1-dead``
…-value, r=oli-obk

Add test for `default_field_values` and `const_default`

Add a test showing `#![feature(default_field_values)]` using `#[const_trait] trait Default` (`#![feature(const_default)]` + `#![feature(const_trait_impl)]`).

CC rust-lang#132162
…=oli-obk

Make `AsyncDrop` check that it's being implemented on a local ADT

Fixes rust-lang#143691
…gillot

Be a bit more careful around exotic cycles in in the inliner

Copied from the comment here: rust-lang#143700 (comment)

---

```rust
#![feature(fn_traits)]

#[inline]
pub fn a() {
    FnOnce::call_once(a, ());
    FnOnce::call_once(b, ());
}

#[inline]
pub fn b() {
    FnOnce::call_once(b, ());
    FnOnce::call_once(a, ());
}
```

This should demonstrate the issue. For ease of discussion, I'm gonna call the two fn-def types `{a}` and `{b}`.

When collecting the cyclic local callees in `mir_callgraph_cyclic` for `a`, we first check the first call terminator in `a`. We end up calling process on `<{a} as FnOnce>::call_once`, which ends up visiting `a`'s instance again. This is cyclical. However, we don't end up marking `FnOnce::call_once` as a cyclical def id because it's a foreign item. That's fine.

When visiting the second call terminator in `a`, which is `<{b} as FnOnce>::call_once`, we end up recursing into `b`. We check the first terminator, which is `<{b} as FnOnce>::call_once`, but although that is its own mini cycle, it doesn't consider itself a cycle for the purpose of this query because it doesn't involve the *root*. However, when we visit the *second* terminator in `b`, which is `<{a} as FnOnce>::call_once`, we end up **erroneously** *not* considering that call to be cyclical since we've already inserted it into our set of seen instances, and as a consequence we don't recurse into it. This means that we never collect `b` as recursive.

Do this in the flipped case too, and we end up having two functions which mututally do not consider each other to be recursive participants. This leads to a query cycle.

---

I ended up also renaming some variables so I could more clearly understand their responsibilities in this code. Let me know if the renames are not welcome.

Fixes rust-lang#143700
r? `@cjgillot`
`tests/ui`: A New Order [0/28]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

These are the some last tests that didn’t make it into the main twenty-eightology of PRs. Part of rust-lang#133895.

r? ``@jieyouxu``
docs(alloc::fmt): Make type optional, instead of matching empty string

Think this is clearer.

Noticed as I was implementing [`tree-sitter-rust-format-args`](https://github.com/nik-rev/tree-sitter-rust-format-args), and attempting to match the empty string results in an error.
…ee1-dead

Make slice comparisons const

This needed a fix for `derive_const`, too, as it wasn't usable in libcore anymore as trait impls need const stability attributes. I think we can't use the same system as normal trait impls while `const_trait_impl` is still unstable.

r? ``@fee1-dead``

cc rust-lang#143800
…, r=oli-obk

Use $crate in macros for rustc_public (aka stable_mir)

This makes `#[macro_use] extern crate rustc_public` unnecessary (which brings all of `rustc_public`'s macros into scope for the entire crate); instead, now you can simply use `rustc_public::run!()`.
resolve: Make disambiguators for underscore bindings module-local

Disambiguators attached to underscore name bindings (like `const _: u8 = something;`) do not need to be globally unique, they just need to be unique inside the module in which they live, because the bindings in a module are basically kept as `Map<BindingKey, SomeData>`.

Also, the specific values of the disambiguators are not important, so a glob import of `const _` may have a different disambiguator than the original `const _` itself.

So in this PR the disambiguator is just set to the current number of bindings in the module.
This removes one more piece of global mutable state from resolver and unblocks rust-lang#143884.
…ler-errors

Fix wrong messages from methods with the same name from different traits

fix issue rust-lang#143740
Add myself to the `infra-ci` reviewer group and adjust some infra auto-labels

- Commit 1 is a drive-by adjustment. Auto-label `src/ci` and `.github/workflows` with https://github.com/rust-lang/rust/labels/A-CI, and include `.github/workflows` for https://github.com/rust-lang/rust/labels/T-infra trigger files.
- Commit 2 adds myself to the `infra-ci` reviewer adhoc group.

r? `````@Kobzol`````
ci: use windows 22 for all free runners

try-job: `x86_64-msvc-*`
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 18, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

📌 Commit 2e21aa8 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 18, 2025
@bors
Copy link
Collaborator

bors commented Jul 18, 2025

⌛ Testing commit 2e21aa8 with merge 68f07e3...

bors added a commit that referenced this pull request Jul 18, 2025
Rollup of 12 pull requests

Successful merges:

 - #143280 (Remove duplicate error about raw underscore lifetime)
 - #143649 (Add test for `default_field_values` and `const_default`)
 - #143699 (Make `AsyncDrop` check that it's being implemented on a local ADT)
 - #143704 (Be a bit more careful around exotic cycles in in the inliner)
 - #143908 (`tests/ui`: A New Order [0/28] )
 - #143909 (docs(alloc::fmt): Make type optional, instead of matching empty string)
 - #143925 (Make slice comparisons const)
 - #143997 (Use $crate in macros for rustc_public (aka stable_mir))
 - #144013 (resolve: Make disambiguators for underscore bindings module-local)
 - #144029 (Fix wrong messages from methods with the same name from different traits)
 - #144063 (Add myself to the `infra-ci` reviewer group and adjust some infra auto-labels)
 - #144069 (ci: use windows 22 for all free runners)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [mir-opt] tests/mir-opt/inline_double_cycle.rs stdout ----

thread '[mir-opt] tests/mir-opt/inline_double_cycle.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:79:21:
Output file `/checkout/tests/mir-opt/inline_double_cycle.a.Inline.panic-abort.diff` from test does not exist
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    [mir-opt] tests/mir-opt/inline_double_cycle.rs

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.